#!/bin/bash
# 数据库文件
dir=/dmdbms
res=`ls -A $dir`
if [ -z $res ];then
  echo "init dm db"
  mv /opt/dmdbms/data/DAMENG /dmdbms/
fi
rm -rf /opt/dmdbms/data
# 启动服务
/etc/init.d/DmServiceDMSERVER start
# 守护
tail -f /dev/null